Ext.override(Ext.view.AbstractView, {
    onRender: function() 
    {
        var me = this;
        this.callOverridden();
        
        if (me.mask && Ext.isObject(me.store)) {
            me.setMaskBind(me.store);
        }


    }
});
Ext.define('AmpleHarvest.objects.admin.view.grid.SystemStatus', 
{
   extend: 'Ext.grid.Panel',
   alias: 'widget.ampleharvest-objects-admin-view-grid-systemstatus',
   requires: 
   [
     'AmpleHarvest.DATA.Store.admin.SystemStatus'
   ],
   
   title: 'System Status',
   iconCls:'window-admin-status-icon',
   //loadMask: true,
   flex:1,
   columns: [
       { header: 'Component',  dataIndex: 'name', flex:1},
       { header: 'Status', dataIndex: 'status', flex: 1 },
       { header: 'Date', 
         dataIndex: 'date', 
         width:200, 
         renderer  : function(str_Value)
         {
            return Ext.util.Format.date(str_Value,"d/M/Y H:i:s T");
         }
       }
   ],
   
   initComponent: function()
   {
      this.store = Ext.create('AmpleHarvest.DATA.Store.admin.SystemStatus');
      
      this.dockedItems= [{
        xtype: 'pagingtoolbar',
        store: this.store,
        dock: 'bottom',
        displayInfo: true
      }],
      
      this.addListener({
           'afterrender' : this.afterrender
      });
      
      this.callParent();
   },
   
   afterrender : function()
   {
      this.store.load();
   }

});